package com.lanou.utp.service.impl;

import com.lanou.utp.entity.Paging;
import com.lanou.utp.entity.Warning;
import com.lanou.utp.mapper.WarningMapper;
import com.lanou.utp.service.WarningService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("warningService")
public class WarningServiceImpl implements WarningService {

    @Resource
    private WarningMapper warningMapper;

    @Override
    public List<Warning> getWarnings(Integer page, Integer size) {
        Integer start = (page - 1) * size;
        List<Warning> warnings = warningMapper.getWarnings(start, size);
        return warnings;
    }

    @Override
    public Paging getPaging(Integer page, Integer size) {
        return null;
    }
}
